package com.cw.realtime.common
package util

import org.apache.flink.streaming.api.windowing.windows.TimeWindow
import DateFormatUtil._

object TimeWindowUtil {

  implicit class WinSyntax(w: TimeWindow) {
    def windowRange: (String, String, String) = {
      val stt = w.getStart.toDateTime
      val edt = w.getEnd.toDateTime
      val curDate = System.currentTimeMillis.toDate
      (stt, edt, curDate)
    }
  }
}
